<?php

namespace MLM\Model;

use MLM\Model\Contact\Storage; 

class Contact extends \MLM\Model\Generic\Object\Mapper {
    
    protected $_storage;
    
    public function __construct(Storage $storage) {
        $this->_storage = $storage;
        
        parent::__construct(
                array(), 
                array(
                    'contact_id'        => 'id',
                    'contact_code'      => 'ktp',
                    'contact_name'      => 'name',
                    'contact_phone'     => 'phone',
                    'contact_email'     => 'email',
                    'contact_mobile'    => 'mobile',
                    'contact_address'   => 'address',
                    'contact_city'      => 'city',
                    'contact_province'  => 'province',
                    'country_id'        => 'countryId',
                    'post_code'         => 'postCode'
                )
        );
    }
    
    public function save(){
        return $this->_storage->save($this);
    }
}
